import request from "@/utils/request";

export function userList(data) {
  return request({
    url: "/appUser/list",
    method: "post",
    data,
  });
}
export function rechargeList(data) {
  return request({
    url: "/recharge/list",
    method: "post",
    data,
  });
}
export function adminUserList(data) {
  return request({
    url: "/adminUser/list",
    method: "post",
    data,
  });
}
export function examineApproval(data) {
  return request({
    url: "/examine/approval",
    method: "post",
    data,
  });
}
export function productList(data) {
  return request({
    url: "/product/list",
    method: "post",
    data,
  });
}
export function withdrawalList(data) {
  return request({
    url: "/withdrawal/list",
    method: "post",
    data,
  });
}
export function constantList(data) {
  return request({
    url: "/constant/list",
    method: "post",
    data,
  });
}

export function approval(data) {
  return request({
    url: "/withdrawal/approval",
    method: "post",
    data,
  });
}
export function rechargeApproval(data) {
  return request({
    url: "/recharge/approval",
    method: "post",
    data,
  });
}
export function saveOrUpdate(data) {
  return request({
    url: "/adminUser/saveOrUpdate",
    method: "post",
    data,
  });
}
export function adminUserDel(data) {
  return request({
    url: "/adminUser/delete",
    method: "post",
    data,
  });
}
export function adminUpdatePassword(data) {
  return request({
    url: "/adminUser/updatePassword",
    method: "post",
    data,
  });
}
export function adminUserEnable(data) {
  return request({
    url: "/adminUser/enable/" + data.id + "/" + data.status,
    method: "put",
    data,
  });
}
export function userUserEnable(data) {
  return request({
    url: "/appUser/enable",
    method: "post",
    data,
  });
}
export function productUserEnable(data) {
  return request({
    url: "/product/enable/" + data.id + "/" + data.status,
    method: "put",
    data,
  });
}
export function action() {
  return process.env.VUE_APP_BASE_API + "/file/upload";
}
export function productSaveOrUpdate(data) {
  return request({
    url: "/product/saveOrUpdate",
    method: "post",
    data,
  });
}
export function transferList(data) {
  return request({
    url: "/transfer/list",
    method: "post",
    data,
  });
}
export function noticeList(data) {
  return request({
    url: "/notice/list",
    method: "post",
    data,
  });
}
export function noticeSaveOrUpdate(data) {
  return request({
    url: "/notice/pub",
    method: "post",
    data,
  });
}
export function noticeDel(data) {
  return request({
    url: "/notice/delete",
    method: "post",
    data,
  });
}
export function balanceHistoryPageList(data) {
  return request({
    url: "balanceHistory/list",
    method: "post",
    data,
  });
}
export function statisticsHome(data) {
  return request({
    url: "statistics/home",
    method: "post",
    data,
  });
}
export function statisticsChart(data) {
  return request({
    url: "statistics/pay/chart",
    method: "post",
    data,
  });
}
export function userProduct(data) {
  return request({
    url: "/appUser/kickbackList",
    method: "post",
    data,
  });
}
export function investChart(data) {
  return request({
    url: "statistics/invest/chart",
    method: "post",
    data,
  });
}
export function teamChart(data) {
  return request({
    url: "statistics/team/chart",
    method: "post",
    data,
  });
}
export function setTeamRate(data) {
  return request({
    url: "user/setTeamRate",
    method: "put",
    data,
  });
}
export function statisticsByDate(data) {
  return request({
    url: "statistics/statisticsByDate",
    method: "post",
    data,
  });
}
export function setInviteUser(data) {
  return request({
    url: "/user/setInviteUser",
    method: "put",
    data,
  });
}
export function getChildren(data) {
  return request({
    url: "/user/getChildren/" + data,
    method: "get",
    data,
  });
}
export function userProductList(data) {
  return request({
    url: "/userProduct/list",
    method: "post",
    data,
  });
}
export function expectedStatistics(data) {
  return request({
    url: "/statistics/expectedStatistics",
    method: "post",
    data,
  });
}
export function betIndex2(data) {
  return request({
    url: "/bet/list",
    method: "post",
    data,
  });
}
export function blockList(data) {
  return request({
    url: "/block/list",
    method: "post",
    data,
  });
}
export function transactionPageList(data) {
  return request({
    url: "/transaction/list",
    method: "post",
    data,
  });
}
// export function dividendList(data) {
//   return request({
//     url: "/dividend/list",
//     method: "post",
//     data,
//   });
// }
export function constants(data) {
  return request({
    url: "/constants/list",
    method: "post",
    data,
  });
}
export function statisticsPayChat(data) {
  return request({
    url: "/statistics/pay/chart",
    method: "post",
    data,
  });
}

export function statisticsBetChat(data) {
  return request({
    url: "/statistics/bet/chart",
    method: "post",
    data,
  });
}
export function statisticsView(data) {
  return request({
    url: "/statistics/view",
    method: "post",
    data,
  });
}
export function appUserFuel(data) {
  return request({
    url: "/appUser/addFuel",
    method: "post",
    data,
  });
}
export function appUsersetTeamRate(data) {
  return request({
    url: "/appUser/setTeamRate",
    method: "put",
    data,
  });
}
export function getUserSiblings(data) {
  return request({
    url: "/appUser/getUserSiblings",
    method: "post",
    data,
  });
}
export function dividendList(data) {
  return request({
    url: "/dividend/list",
    method: "post",
    data,
  });
}
export function teamDailyList(data) {
  return request({
    url: "/teamDaily/list",
    method: "post",
    data,
  });
}
export function aiTop20(data) {
  return request({
    url: "/statistics/aiTop20",
    method: "post",
    data,
  });
}
export function amountTop20(data) {
  return request({
    url: "/statistics/amountTop20",
    method: "post",
    data,
  });
}
export function betTop20(data) {
  return request({
    url: "/statistics/betTop20",
    method: "post",
    data,
  });
}
export function performanceTop20(data) {
  return request({
    url: "/statistics/performanceTop20",
    method: "post",
    data,
  });
}
export function kill(data) {
  return request({
    url: "/bet/kill",
    method: "post",
    data,
  });
}
export function getKillRate(data) {
  return request({
    url: "/constants/getKillRate",
    method: "get",
    data,
  });
}
export function setKillRate(data) {
  return request({
    url: "/constants/setKillRate",
    method: "post",
    data,
  });
}
export function statisticsKill(data) {
  return request({
    url: "/statistics/kill",
    method: "post",
    data,
  });
}
export function getInsuranceKillRate(data) {
  return request({
    url: "/constants/getInsuranceKillRate",
    method: "get",
    data,
  });
}
export function smsCode(data) {
  return request({
    url: "/adminUser/sms/code",
    method: "post",
    data,
  });
}
export function getTransactionState(data) {
  return request({
    url: "/constants/getTransactionState",
    method: "get",
    data,
  });
}
export function setTransactionState(data) {
  return request({
    url: "/constants/setTransactionState/" + data,
    method: "get",
  });
}
export function updateParent(data) {
  return request({
    url: "/appUser/updateParent",
    method: "post",
    data,
  });
}
export function productPageList(data) {
  return request({
    url: "/dividend/productList",
    method: "post",
    data,
  });
}
export function dividendSaveOrUpdate(data) {
  return request({
    url: "/dividend/saveOrUpdate",
    method: "post",
    data,
  });
}
export function dividendEnable(data) {
  return request({
    url: `/dividend/enable/${data.id}/${data.status}`,
    method: "put",
    data,
  });
}
export function setRemarks(data) {
  return request({
    url: `/appUser/setRemarks`,
    method: "put",
    data,
  });
}

export function addFuel(data) {
  return request({
    url: `/appUser/addFuel`,
    method: "post",
    data,
  });
}
export function getRate(data) {
  return request({
    url: `/constants/getRate`,
    method: "get",
    data,
  });
}
export function setRate(data) {
  return request({
    url: `/constants/setRate/` + data,
    method: "get",
    data,
  });
}
export function setPartner(data) {
  return request({
    url: `/appUser/setPartner/${data.userId}/${data.isPartner}`,
    method: "put",
    data,
  });
}
export function resetPassword(data) {
  return request({
    url: `/appUser/resetPassword/${data.userId}/${data.type}`,
    method: "put",
    data,
  });
}
export function consultList(data) {
  return request({
    url: `/consult/list`,
    method: "post",
    data,
  });
}
export function consultpub(data) {
  return request({
    url: `/consult/pub`,
    method: "post",
    data,
  });
}
export function consultdelete(data) {
  return request({
    url: `/consult/delete`,
    method: "post",
    data,
  });
}

export function notificationList(data) {
  return request({
    url: `/notification/list`,
    method: "post",
    data,
  });
}
export function notificationpub(data) {
  return request({
    url: `/notification/pub`,
    method: "post",
    data,
  });
}
export function notificationdelete(data) {
  return request({
    url: `/notification/delete`,
    method: "post",
    data,
  });
}
export function receiptAuth(data) {
  return request({
    url: `/receiptAuth/list `,
    method: "post",
    data,
  });
}
export function approve(data) {
  return request({
    url: `/receiptAuth/approve`,
    method: "post",
    data,
  });
}

export function update(data) {
  return request({
    url: `/constants/update`,
    method: "post",
    data,
  });
}
export function setPartnerLevel(data) {
  return request({
    url: `/appUser/setPartnerLevel/${data.userId}/${data.level}`,
    method: "put",
  });
}
export function entityPage(data) {
  return request({
    url: `/entity/product/list`,
    method: "post",
    data,
  });
}
export function entitySave(data) {
  return request({
    url: `/entity/product/saveOrUpdate`,
    method: "post",
    data,
  });
}
export function saveOrUpdateType(data) {
  return request({
    url: `/entity/product/saveOrUpdateType`,
    method: "post",
    data,
  });
}
export function typeList(data) {
  return request({
    url: `/entity/product/typeList`,
    method: "post",
    data,
  });
}
export function deleteType(id) {
  return request({
    url: `/entity/product/deleteType/${id}`,
    method: "delete",
  });
}
export function productDelete(data) {
  return request({
    url: `/entity/product/delete/${data.id}/${data.status}`,
    method: "delete",
  });
}
export function questions(data) {
  return request({
    url: `/questions/list`,
    method: "post",
    data,
  });
}
export function questionsDel(data) {
  return request({
    url: `/questions/delete/${data}`,
    method: "post",
  });
}
export function saveUpdate(data) {
  return request({
    url: `/questions/saveOrUpdate`,
    method: "post",
    data,
  });
}
export function withdrawById(data) {
  return request({
    url: `/statistics/withdrawById`,
    method: "post",
    data,
  });
}
export function listByUser(data) {
  return request({
    url: `/transfer/listByUser`,
    method: "post",
    data,
  });
}
export function allChildrenAmount(userId) {
  return request({
    url: `/statistics/allChildrenAmount/${userId}`,
    method: "get",
  });
}
export function productGet(id) {
  return request({
    url: `/entity/product/get/${id}`,
    method: "get",
  });
}
export function setAuth(data) {
  return request({
    url: `/appUser/setAuth/${data.userId}/${data.auth} `,
    method: "put",
  });
}
export function productExpireList(data) {
  return request({
    url: `/productExpire/list`,
    method: "post",
    data,
  });
}
export function rechargeStatistics(data) {
  return request({
    url: `/recharge/statistics`,
    method: "post",
    data,
  });
}
export function withdrawalStatistics(data) {
  return request({
    url: `/withdrawal/statisticsPage`,
    method: "post",
    data,
  });
}
export function totalStatistics(data) {
  return request({
    url: `/withdrawal/totalStatistics`,
    method: "post",
    data,
  });
}
export function rechargetotalStatistics(data) {
  return request({
    url: `/recharge/totalStatistics`,
    method: "post",
    data,
  });
}
export function updateEmail(data) {
  return request({
    url: `/appUser/updateEmail`,
    method: "put",
    data,
  });
}
export function approvalBatch(data) {
  return request({
    url: `/withdrawal/approvalBatch`,
    method: "post",
    data,
  });
}
export function statisticsByStatus(data) {
  return request({
    url: `/withdrawal/statisticsByStatus`,
    method: "post",
    data,
  });
}
export function statisticsFor5(data) {
  return request({
    url: `/teamDaily/statisticsFor5`,
    method: "post",
    data,
  });
}
export function balanceDeductionsSet(data) {
  return request({
    url: `/balanceDeductions/set`,
    method: "post",
    data,
  });
}
export function balanceDeductionsList(data) {
  return request({
    url: `/balanceDeductions/list`,
    method: "post",
    data,
  });
}
export function dividendStatistics(data) {
  return request({
    url: `/statistics/dividendStatistics`,
    method: "post",
    data,
  });
}
export function setWithdraw(userId, status) {
  return request({
    url: `/appUser/setWithdraw/${userId}/${status}`,
    method: "put",
  });
}
export function start() {
  return request({
    url: `/adminUser/start`,
    method: "post",
  });
}
export function stop() {
  return request({
    url: `/adminUser/stop`,
    method: "post",
  });
}
